﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tayninh2011
{
    class TnFeatureClassName
    {
        #region Fields

        #region Cac layer duoc dung de tinh toan
        private static string tn_thua = "tn_thua";
        private static string sde_tn_thua = "sde.tn_thua";
        private static string tn_duong = "tn_duong";
        private static string sde_tn_duong = "sde.tn_duong";
        private static string tn_duong_giadat = "tn_duong_giadat";
        private static string sde_tn_duong_giadat = "sde.tn_duong_giadat";
        private static string tn_hem = "tn_hem";
        private static string sde_tn_hem = "sde.tn_hem";
        private static string tn_xa = "thixa_xapoly";
        private static string sde_tn_xa = "sde.thixa_xapoly";
        #endregion Cac layer duoc dung de tinh toan

        #region Cac featureClass sinh ra trong qua trinh tinh toan
        private static string hem_buffer_1m = "hem_buffer_1m";
        private static string hem_layer_buffer_1m = "hem_layer_buffer_1m";
        private static string hem_buffer_1m_crt_frm_layer = "hem_buffer_1m_selected";
        #endregion Cac featureClass sinh ra trong qua trinh tinh toan

        #endregion Fields

        #region Properties

        #region Cac layer duoc dung de tinh toan
        public static string THUA { get { return tn_thua; } set { tn_thua = value; } }
        public static string SDE_THUA { get { return "sde." + tn_thua; } set { sde_tn_thua = value; tn_thua = getName(sde_tn_thua); } }
        public static string DUONG { get { return tn_duong; } set { tn_duong = value; } }
        public static string SDE_DUONG { get { return "sde." + tn_duong; } set { sde_tn_duong = value; tn_duong = getName(sde_tn_duong); } }
        public static string DUONG_GIADAT { get { return tn_duong_giadat; } set { tn_duong_giadat = value; } }
        public static string SDE_DUONG_GIADAT { get { return "sde." + tn_duong_giadat; } set { sde_tn_duong_giadat = value; tn_duong_giadat = getName(sde_tn_duong_giadat); } }
        public static string HEM { get { return tn_hem; } set { tn_hem = value; } }
        public static string SDE_HEM { get { return "sde." + tn_hem; } set { sde_tn_hem = value; tn_hem = getName(sde_tn_hem); } }
        public static string XA { get { return tn_xa; } set { tn_xa = value; } }
        public static string SDE_XA { get { return "sde." + tn_xa; } set { sde_tn_xa = value; tn_xa = getName(sde_tn_xa); } }
        #endregion Cac layer duoc dung de tinh toan
        
        #region Cac featureClass sinh ra trong qua trinh tinh toan
        public static string HEM_BUFFER_1M { get { return hem_buffer_1m; } }
        public static string HEM_LAYER_BUFFER_1M { get { return hem_layer_buffer_1m; } }
        public static string HEM_BUFFER_1M_CREATED_FROM_LAYER { get { return hem_buffer_1m_crt_frm_layer; } }
        #endregion Cac featureClass sinh ra trong qua trinh tinh toan

        #endregion Properties

        #region Methods
        private static string getName(string sde_name)
        {
            string name = String.Empty;
            string[] array = sde_name.Split(',');
            name = array.GetValue(1).ToString();
            return name;
        }
        #endregion Methods
    }
}
